package com.sc.nft.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.entity.TradingRecycleLog;
import com.sc.nft.mapper.TradingRecycleLogMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

/**
* @author PC
* @description 针对表【sc_trading_recycle_log(交易池回收日志)】的数据库操作Dao
* @createDate 2024-11-01 14:31:25
*/
@Slf4j
@Repository
public class TradingRecycleLogDao extends ServiceImpl<TradingRecycleLogMapper, TradingRecycleLog>{

    public TradingRecycleLog getByUserCollectionChainLogId(Long id) {
        LambdaQueryWrapper<TradingRecycleLog>wrapper=new LambdaQueryWrapper<>();
        wrapper.eq(TradingRecycleLog::getUserCollectionChainLogId,id);
        wrapper.last("limit 1");
        return getOne(wrapper);
    }
}
